package L5;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class TestFileAgain {
    public static void main(String[] args) throws IOException {
        byte[] raw = new byte[256];
        try (FileInputStream fileSource = new FileInputStream("QQ.png");FileOutputStream fileTarget = new FileOutputStream("QQBak.png");) {
            while(fileSource.read(raw) != -1 )
                fileTarget.write(raw);
        } catch (Exception e) {
            System.out.println(e);
        }
    }
}
